﻿@using WebShop.Infrastructure;

@model WebShop.Contracts.Product

@{
    ViewBag.Title = "Details";
}

<h2>Details</h2>

<fieldset>
    <legend>Product</legend>

    <div class="display-label">ProductName</div>
    <div class="display-field">
        @Html.DisplayFor(model => model.ProductName)
    </div>

    <div class="display-label">Suppliers</div>
    <div class="display-field">
        @Html.DisplayFor(model => model.Supplier.CompanyName)
    </div>

    <div class="display-label">Categories</div>
    <div class="display-field">
        @Html.DisplayFor(model => model.Category.CategoryName)
    </div>

    <div class="display-label">QuantityPerUnit</div>
    <div class="display-field">
        @Html.DisplayFor(model => model.QuantityPerUnit)
    </div>

    <div class="display-label">UnitPrice</div>
    <div class="display-field">
        @Html.DisplayFor(model => model.UnitPrice)
    </div>

    <div class="display-label">UnitsInStock</div>
    <div class="display-field">
        @Html.DisplayFor(model => model.UnitsInStock)
    </div>

    <div class="display-label">UnitsOnOrder</div>
    <div class="display-field">
        @Html.DisplayFor(model => model.UnitsOnOrder)
    </div>

    <div class="display-label">ReorderLevel</div>
    <div class="display-field">
        @Html.DisplayFor(model => model.ReorderLevel)
    </div>

    <div class="display-label">Discontinued</div>
    <div class="display-field">
        @Html.DisplayFor(model => model.Discontinued)
    </div>
</fieldset>

<br />

@{ Html.RenderPartial("_ProductCart", Model); }


<p>
    @Html.ActionLink("Edit", "Edit", new { id = Model.ProductID }) |
    <a href="@Url.DeleteProduct(Model.ProductID)">Delete</a> |
    <a href="@Url.ProductsList()">Back to List</a>
</p>